home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 17
/
Hot Mix 17.iso
/
HM17_SGI
/
html
/
vendors
/
siteways
/
software
/
bin
/
nsservers.sh
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
1997-07-16
|
652b
|
32 lines
#!/bin/sh
#
# $Header: /ext/src/lss/src/scripts/RCS/nsservers.sh,v 1.6 1997/03/13 16:27:49 bert Exp $
#
CDROM="$1"
#
# extract next parameter directly following -d
#
DIRS=`ps -ef | fgrep "httpd " | fgrep -v fgrep | while read line
do
echo "$line" | sed 's/.*-d //' | awk '{print $1;}'
done | sort -u`
#
# check DIRS, for configuration files
#
for dir in $DIRS
do
config_file=$dir/magnus.conf
if [ -f $config_file ]
then
ADDRESS=`fgrep -i Address $config_file | awk '{print $2}'`
SERVERNAME="`$CDROM/bin/lookup $ADDRESS`"
if [ ! -z "$SERVERNAME" ]
then
echo "$config_file:$SERVERNAME"
fi
fi
done